| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | var Conclusion = require('./Conclusion'), |
||
| 10 | var Gender = function(json){ |
||
| 11 | |||
| 12 | // Protect against forgetting the new keyword when calling the constructor |
||
| 13 | if(!(this instanceof Gender)){ |
||
| 14 | return new Gender(json); |
||
| 15 | } |
||
| 16 | |||
| 17 | // If the given object is already an instance then just return it. DON'T copy it. |
||
| 18 | if(Gender.isInstance(json)){ |
||
| 19 | return json; |
||
| 20 | } |
||
| 21 | |||
| 22 | Conclusion.call(this, json); |
||
| 23 | |||
| 24 | if(json){ |
||
| 25 | this.setType(json.type); |
||
| 26 | } |
||
| 27 | }; |
||
| 28 | |||
| 78 | module.exports = Gender; |